﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>用户中心欢迎页 - ${web.name}${web.additionalTitle!}</title>
    <link href="${root}/css/global.css" type="text/css" rel="stylesheet"/>
    <link href="${root}/css/layout.css" type="text/css" rel="stylesheet"/>
    <link href="${root}/css/member.css" type="text/css" rel="stylesheet"/>
    <link href="${root}/css/buy.css" type="text/css" rel="stylesheet"/>
    <script src="${root}/js/jquery.js" type="text/javascript"></script>
    <script type="text/javascript">
        function g(o) {
            return document.getElementById(o);
        }
        function HoverLi(m, n, counter) {
            for (var i = 1; i <= counter; i++) {
                g('tb_' + m + i).className = 'dd_normal';
                g('tbc_' + m + i).className = 'undis';
            }
            g('tbc_' + m + n).className = 'dis';
            g('tb_' + m + n).className = 'dd_curr';
        }
        function del(id) {
            var ids = new Array(1);
            ;
            ids[0] = id;
            $.post("${base}/delCollect.jspx", {collectIds: ids}, function (data) {
                alert(data);
                location.reload();
            });
        }
        function dels() {
            var j = 0;
            var h = 0;
            var fchecked = document.getElementsByName("colect_goods_list");
            for (var i = 0; i < fchecked.length; i++) {
                if (fchecked[i].checked) {
                    j++;
                }
            }
            var ids = new Array(j);
            for (var i = 0; i < fchecked.length; i++) {
                if (fchecked[i].checked) {
                    ids[h] = fchecked[i].id;
                    h++;
                }
            }
            if (ids.length < 1) {
                alert('请选择');
                return;
            }
            $.post("${base}/delCollect.jspx", {collectIds: ids}, function (data) {
                alert(data);
                location.reload();

            });
        }
        function checkall(o) {
            $("input[type=checkbox]").each(function () {
                $(this).attr("checked", o);
            })
        }

        function addToCart() {
            var j = 0;
            var h = 0;
            var fchecked = document.getElementsByName("colect_goods_list");
            for (var i = 0; i < fchecked.length; i++) {
                if (fchecked[i].checked && !fchecked[i].disabled) {
                    j++;
                }
            }
            var ids = new Array(j);
            for (var i = 0; i < fchecked.length; i++) {
                if (fchecked[i].disabled) {
                    continue;
                }
                if (fchecked[i].checked) {
                    ids[h] = fchecked[i].faid;
                    h++;
                }
            }
            if (ids.length < 1) {
                alert('请选择');
                return;
            }
            $.post("${base}/addAll_to_cart.jspx", {
                'productFashId': ids,
                'count': 1,
                'isAdd': true
            }, function (data) {
                if (data.status == 1) {
                    location.href = '${base}/shopping_cart.jspx?backUrl=${location}';
                } else if (data.status == 0) {
                    location.href = '${loginUrl}';
                } else {
                    alert('error code: ' + data.status);
                }
            }, 'json');
        }
    </script>
    <style type="text/css">
        <!--
        .user_left a.current1 {
            color: #cd0001;
            background: url(${root}/img/red_arrow.gif) no-repeat 20px center;
        }

        -->
    </style>
</head>

<body>
[#include "../include/header_top.html"/]
<div id="head">
    [#include "../include/header_search.html"/]
    [#include "../include/header_nav.html"/]
</div>
<div class="w960">
    <div class="buy_position">您当前的位置：<a href="" target="_blank">首页</a>&nbsp;&gt;&nbsp;用户中心&nbsp;&gt;&nbsp;欢迎页</div>
</div>
<div class="w960 mt10">
    [#include "member_nav.html"/]
    <div class="user_right">
        <div class="usercenter_position">
            <span>我的收藏夹</span>

            <div class="date_dd">

            </div>
        </div>
        <div class="dd_list">


            <div class="intro_box">
                <div class="intro"><p>

                    <p><span class="goon_btn"><a title="首页" href="${base}/" style="color: #fff">继续购物</a></span></p>

                    <div class="right_line">
                        <p style="line-height: 24px"><strong>您共收藏了<font size="+0">
                            ${pagination.totalCount} </font>个商品</strong></p>
                        <table class="table" cellspacing="0" cellpadding="0" width="100%" border="0">
                            <tbody>
                            <tr>
                                <td class="td_top" valign="middle" align="left" colspan="7" height="30"><span
                                        style="padding-left: 5px; margin-right: 200px"><input id="colect_goods_list_all"
                                                                                              type="checkbox"
                                                                                              onclick="checkall(this.checked)"
                                                                                              value="all"/>&nbsp;全选</span>
                                </td>
                            </tr>
                            [#if pagination.list?size gt 0]
                            [#list pagination.list as coll]
                            <tr>
                                <td class="td_fav" valign="middle" align="left" width="4%" style="padding-left: 5px">
                                    <div><input type="checkbox" dxml="630208" id="${coll.id}" faid="${coll.fashion.id}"
                                                name="colect_goods_list" value="30163" [#if coll.fashion.stockCount
                                        ==0]disabled="disabled"[/#if]/>
                                    </div>
                                </td>
                                <td class="td_fav" valign="middle" align="center" width="14%"><a
                                        href="${coll.fashion.productId.url}" target="_blank"><img height="55"
                                                                                                  alt="地图自动三折晴雨伞"
                                                                                                  src="[#if coll.fashion.fashionPic??]${coll.fashion.fashionPic}[#else][/#if]"
                                                                                                  width="55"/></a></td>
                                <td class="td_fav" valign="middle" align="center" width="21%"><a title="地图自动三折晴雨伞"
                                                                                                 href="http://www.quwan.com/goods-30163.html"
                                                                                                 target="_blank"
                                                                                                 style="color: #653000">[#if
                                    coll.fashion.productId.name?length &gt;
                                    8]${coll.fashion.productId.name?substring(0,8)}...[#else]${coll.fashion.productId.name}[/#if]</a>
                                </td>
                                <td class="td_fav" valign="middle" align="center" width="30%">成交价：<span
                                        id="THIS_PRICE_30163" style="color: #653000">${coll.fashion.salePrice!0}元</span><span>[#if coll.fashion.stockCount ==0]&nbsp;该商品暂无库存[/#if]</span>
                                </td>
                                <td class="td_fav" valign="middle" align="center" style="text-align: center">
                                    <div class="list" style="position: relative">&nbsp;</div>
                                </td>
                                <td class="td_fav" valign="middle" align="center" width="17%"><a
                                        href="javascript:if (confirm('您确定要从收藏夹中删除选定的玩物吗？')) del(${coll.id})"
                                        style="color: #653000">删除</a></td>
                            </tr>
                            [/#list]
                            [#else]
                            <tr>
                                <td colspan="6">暂无收藏</td>
                            </tr>
                            [/#if]

                            <tr>
                                <td class="td td_sum" valign="middle" align="right" colspan="7"><span class="right_top"><span
                                        class=""><a href="javascript:if (confirm('您确定要从收藏夹中删除选定的玩物吗？')) dels()"
                                                    style="">删除选中商品</a></span></span>&nbsp;&nbsp;<span
                                        class="right_top"><span class="goon_btn"><a href="javascript:addToCart();"
                                                                                    style="">购买选中商品</a></span></span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <p>

                    <form id="page_list_sort_form" action="/user.php" method="get" name="selectPageForm">
                        <input id="page_list_order" type="hidden" name="order"/> <input id="page_list_sort"
                                                                                        type="hidden" name="sort"/>
                        <input type="hidden" name="act" value="collection_list"/>
                    </form>
                    </p>
                    [@pagination_style style='10'][/@pagination_style]
                </div>
            </div>

            <div class="intro_box">

            </div>


        </div>
    </div>
    <div class="clear"></div>
</div>
[#include "../include/footer.html"/]
</body>
</html>
